﻿//07.Write a program that finds the greatest of given 5 variables.

using System;

namespace GreatestVariable
{
    class GreatestVar
    {
        static void Main()
        {
            Console.Write("Please enter the first number: ");
            int a = int.Parse(Console.ReadLine());
            Console.Write("Please enter the second number: ");
            int b = int.Parse(Console.ReadLine());
            Console.Write("Please enter the third number: ");
            int c = int.Parse(Console.ReadLine());
            Console.Write("Please enter the fourth number: ");
            int d = int.Parse(Console.ReadLine());
            Console.Write("Please enter the fifth number: ");
            int f = int.Parse(Console.ReadLine());

            if (a > b && a > c && a > d && a > f)
            {
                Console.WriteLine("The greatest number is: {0}", a);
            }
            else if (b > a && b > c && b > d && b > f)
            {
                Console.WriteLine("The greatest number is: {0}", b);
            }
            else if (c > a && c > b && c > d && c > f)
            {
                Console.WriteLine("The greatest number is: {0}", c);
            }
            else if (d > a && d > b && d > c && d > f)
            {
                Console.WriteLine("The greatest number is: {0}", d);
            }
            else if (f > a && f > b && f > c && f > d)
            {
                Console.WriteLine("The greatest number is: {0}", f);
            }
            else
            {
                Console.WriteLine("All numbers are equal");
            }
        }
    }
}
